#include<bits/stdc++.h>
using namespace std;
using ll=long long;
ll n,m,k;
vector<ll>e[200001];
bool v[200001];
bool g[200001];
vector<vector<ll>>ans;
vector<vector<ll>>s[200001];
vector<ll> dfs(ll x) {
	v[x]=1;
	if(g[x])
		s[x].push_back({});
	for(int j=0;j<e[x].size();j++) {
		if(!v[e[x][j]]) {
			vector<ll>r=dfs(e[x][j]);
			if(r.size())
				s[x].push_back(r);
		}
	}
	for(int j=0;j<s[x].size();j+=2) {
		if(j+1<s[x].size()) {
			ans.push_back({});
			for(int k=0;k<s[x][j].size();k++)
				ans[ans.size()-1].push_back(s[x][j][k]);
			ans[ans.size()-1].push_back(x);
			for(int k=s[x][j+1].size()-1;k>=0;k--)
				ans[ans.size()-1].push_back(s[x][j+1][k]);	
		}
	}
	if(s[x].size()&1) {
		vector<ll>tmp=s[x][s[x].size()-1];
		tmp.push_back(x);
		s[x].clear();
		s[x].shrink_to_fit(); 
		return tmp;
	}
	s[x].clear();
	s[x].shrink_to_fit(); 
	return {};
} 
int main(){
	freopen("travel.in","r",stdin);
	freopen("travel.out","w",stdout);
	ios::sync_with_stdio(false);
	cin.tie(0),cout.tie(0);
	cin>>n>>m>>k;
	for(int i=1;i<=m;i++) {
		ll u,v;
		cin>>u>>v;
		e[u].push_back(v);
		e[v].push_back(u);
	}
	for(int i=1;i<=k;i++) {
		ll c;
		cin>>c;
		g[c]=1;
	}
	for(int i=1;i<=n;i++) 
		if(!v[i])
			vector<ll>rs=dfs(i);
	cout<<ans.size()<<'\n';
	for(int i=0;i<ans.size();i++) {
		for(int j=0;j<ans[i].size();j++)
			cout<<ans[i][j]<<' ';
		cout<<'\n';
	}
	return 0;
}


